<template>
	<view class="goods">
		<uni-section color="black" title="货品入库信息" type="line"></uni-section>

		<view class="">
			<view class="text_bb">入库货品编号*
				<input class="text_cc" v-model="ee.Goods_number">
			</view>
			<view class="text_bb">货品名称*
				<input class="text_cc" v-model="ee.Goods_name">
			</view>
			<view class="text_bb">货品类别*
				<input class="text_cc" v-model="ee.Goods_type">
			</view>
			<view class="text_bb">货品数量*
				<input class="text_cc" v-model="ee.Goods_total">
			</view>
			<view class="text_bb">货品颜色
				<input class="text_cc" v-model="ee.Goods_colour">
			</view>
			<view class="text_bb">货品尺码
				<input class="text_cc" v-model="ee.Goods_size">
			</view>
			<view class="text_bb">货品价格
				<input class="text_cc" v-model="ee.Goods_price">
			</view>
			<view class="text_bb">上架时间
				<input class="text_cc" v-model="ee.Goods_time">
			</view>
			<view class="text_bb">上架办理人
				<input class="text_cc" v-model="ee.Goods_handler">
			</view>
		
		</view>

		<view class="text_dd">上传张照片</view>
		<image class="text_ee" src="../../static/avatar.png"></image>
		<image class="text_ee" src="../../static/sharecat.png"></image>
		<image class="text_ee" src="../../static/avatar.png"></image>

	<view class="goods_a">
				<uni-section color="black" title="其他信息" type="line"></uni-section>
				<view class="text_bb">供货商姓名
					<input class="text_cc" v-model="ee.Goods_supplier">
				</view>
				<view class="text_bb">供货商手机号</view>
				<input class="text_cc" v-model="ee.Goods_one">
			</view>


		<view class="goods_b">
			<uni-section color="black" title="备注" type="line"></uni-section>
			<view class="text_bb">这个商品已被订阅</view>

		</view>
		<view class="text_d1">编辑</view>
		<view @click="tiao_fn()" class="text_e1">复制上架</view>

	</view>





</template>

<script>
	export default {

		data() {
			return {
				ee: ''
			}
		},
		methods: {
			tiao_fn() {

				console.log(this.ee);
				uni.request({
					url: 'http://localhost:3000/xxxx',
					data: {
						xx: this.ee
					}, //仅为示例，并非真实接口地址。
					success: (res) => {
						console.log(res.data);
						this.qq = res.data.data
						console.log(this.qq);
					}
				});
				uni.navigateTo({
					url: '/pages/stock/manage'
				})
			}
		},
		onLoad: function(option) { //option为object类型，会序列化上个页面传递的参数
			console.log(option.id);
			// this.ee = JSON.parse(option.id)
			this.ee = JSON.parse(decodeURIComponent(option.id))
			console.log(this.ee);
		},
		mounted() {

		}

	}
</script>

<style>
	.goods {
		width: 370px;
		height: 410px;
		background-color: white;
		margin:2px;
		border-radius: 5px;
	}

	.goods_a {
		width: 370px;
		height: 110px;
		background-color:white;
		margin-top: 15px;

	}

	.goods_b {
		width: 370px;
		height: 90px;
		background-color: white;
	}

	.text_bb {
		margin: 5px;
		border-bottom: 2px dashed #f6f6f6;
		font-size: 15px;
		color: black;
		line-height: 30px;
	}

	.text_dd {
		margin: 5px;
		font-size: 12px;
		color: black;
		line-height: 30px;
	}

	.text_cc {
		width: 100px;
		height: 20px;
		margin-left: 260px;
		margin-top: -30px;
		font-size: 15px;
		line-height: 20px;
		text-align: right;
	}

	.text_ee {
		width: 60px;
		height: 60px;
		padding-right: 60px;
	}

	.text_d1 {
		width: 80px;
		height: 40px;
		background-color: yellow;
		text-align: center;
		line-height: 40px;
		margin-left: 205px;
	}

	.text_e1 {
		width: 80px;
		height: 40px;
		background-color: #fccc04;
		margin-top: -39px;
		margin-left: 285px;
		text-align: center;
		line-height: 40px;
	}
</style>
